/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package daos;

import entity.Usuarios_care;
import javax.persistence.EntityManager;
import javax.persistence.Query;

/**
 *
 * @author MADD
 */
public class UsuariosDAO {

    public static Usuarios_care findbyLogin(String login, EntityManager em){
        Query query = em.createQuery("SELECT u FROM Usuarios_care u WHERE u.login = ?1");
        query.setParameter(1, login);
        Usuarios_care ap = (Usuarios_care)query.getSingleResult();
        return ap;
    }
    
}
